package com.dream.utils.image;

import java.util.Date;

import com.dream.utils.date.DateParseUtils;
import com.dream.utils.system.cfg.SystemConfigUtils;

/**
 * 
 * @copyright evan
 * @author evan
 * @date 2013-9-2
 */
public class PictureExifInfo{
	private Date createTime;
	private String name;
	private int width;
	private int height;
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getHeight() {
		return height;
	}
	public void setHeight(int height) {
		this.height = height;
	}
	/**
	 * set the default value from system 
	 */
	public void init(){
		
		Date d = new Date();
		createTime = d;
		name= DateParseUtils.format(d, "yyyyMMddHHmmss");
		this.width = SystemConfigUtils.instance().getInteger("system.image.width", 140);
		this.height = SystemConfigUtils.instance().getInteger("system.image.height", 140);
	}
	
	@Override
	public String toString() {
		return new StringBuilder("createTime:").append(this.createTime)
		.append("   name:").append(this.name)
		.append("   width:").append(this.width)
		.append("   height").append(height).toString();
	}
	
	
}